//
//  Dictionary+Utility.swift
//  MyRanger
//
//  Created by Armstrong Liu on 2018/5/23.
//  Copyright © 2018 Everbridge. All rights reserved.
//

import Foundation

func +=<U,T>(lhs: inout [U: T], rhs: [U: T]) {
    for (key, value) in rhs {
        lhs[key] = value
    }
}

extension Dictionary {
    func parameterizedStringForServer() -> String {
        let parameters = self.map { (k, v) in "\(k)=\(v)" }
        return parameters.joined(separator: "&")
    }
}
